Tiktok API

Descripcion

Como utilizar la API de Tiktok para obtener el feed de una cuenta.

Tiktok login inicial

Access token tiktok

Get Feed Tiktok

Metodo

Para obtener el token con el código de authorización lo hacemos con la siguiente solicitud CURL:

curl --location --request POST 'https://open.tiktokapis.com/v2/oauth/token/' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cache-Control: no-cache' \
--data-urlencode 'client_key=CLIENT_KEY' \
--data-urlencode 'client_secret=CLIENT_SECRET' \
--data-urlencode 'code=MI_CODIGO' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'redirect_uri=https://www.example.com/auth/'

Para obtener la lista de videos de la cuenta se hace con la siguiente solicitud CURL:

curl -L -X POST 'https://open.tiktokapis.com/v2/video/list/?fields=cover_image_url,id,title' \
-H 'Authorization: Bearer act.sYXWUPiqep5VPCqR8s9mPnMjr7a1R37qiV4zu60EZLrDSgJo9HWmagDHKtSn!4825' \
-H 'Content-Type: application/json' \
--data-raw '{
    "max_count": 20,
    "cursor":""
}'
Tags

Tiktok | API